<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us">
<head>
	<title>Report for enrichment of {{ data['name'] }}</title>

	<link rel="stylesheet" href="web/gridtable.css" type="text/css" media="print, projection, screen" />
	<link rel="stylesheet" href="web/tablesorterblue.css" type="text/css" media="print, projection, screen" />
	<script type="text/javascript" src="web/jquery-latest.js"></script>
	<script type="text/javascript" src="web/jquery.tablesorter.js"></script>
	<script type="text/javascript" src="web/jquery.metadata.js"></script>	

    <script type="text/javascript" id="js">
$(document).ready(function() { 
    $("table").tablesorter({ 
        // pass the headers argument 
        headers: { 
            // disable links column and details column 
            1: { sorter: false },
            3: { sorter: false }
        } 
    }); 
});
	</script>
</head>

<body>

SSEA Report
<br/>
Enrichment of observation {{ data['wname'] }} ({{ data['wdesc'] }}) across sample sets
<br/><br/>

<table id="report" class="tablesorter" border="0" cellpadding="0" cellspacing="1">
<thead>
<tr>
<th>Index</th>
<th>Link</th>
<th>Sample Set</th>
<th>Details</th>
<th>Size</th>
<th>ES</th>
<th>NES</th>
<th>NOM p-val</th>
<th>FDR q-val</th>
<th>FWER p-val</th>
<th>Rank at max</th>
<th>Leading edge size</th>
<th>Leading edge percent</th>
</tr>
</thead>
<tbody>
{% for result in data['results'] %}
<tr>
<td>{{ loop.index }}</td>
<td>
{% if result['details_html'] is not none %}
  <a href="{{ result['details_html'] }}">Details</a>
{% endif %}
</td>
<td>{{ result['name'] }}</td>
<td>{{ result['desc'] }}</td>
<td>{{ result['size'] }}</td>
<td>{{ result['es'] }}</td>
<td>{{ result['nes'] }}</td>
<td>{{ result['pval'] }}</td>
<td>{{ result['qval'] }}</td>
<td>{{ result['fwerp'] }}</td>
<td>{{ result['rank_at_max'] }}</td>
<td>{{ result['leading_edge_size'] }}</td>
<td>{{ 100.0 * result['leading_edge_size'] / result['size'] }}%</td>
</tr>
{% endfor %}
</tbody>
</table>

</body>
</html>